wayland: Fix some dnd corner case
authorMatthias Clasen <mclasen@redhat.com>
Sat, 19 Jun 2021 13:57:38 +0000 (06:57 -0700)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 19 Jun 2021 15:03:21 +0000 (08:03 -0700)
commit4df93140398f911ee310566928027f4865903c4e
treeb4379f5986255a396a08e6794ec3e397acca8603
parentc8ad4d5debc48e8d348cd704a6c5f1835536a71f
wayland: Fix some dnd corner case

We must call gdk_drag_drop_done() when the drag ends,
successfully or not. Without this, we get an unwarranted
emission of ::cancel after a successful drop.

Since only the first call to gdk_drag_drop_done() is taking
effect, it is safe to call as a fallback, after emitting
::dnd-finished. If the application connects to that signal
and calls gdk_drag_drop_done() itself, its call will take
precedence.

This matches what the X11 implementation does.
gdk/wayland/gdkdrag-wayland.c